package com.hong.spring.beanfactory;

import com.hong.spring.common.entity.JSR_250;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @Auther: csh
 * @Date: 2020/7/9 16:50
 * @Description:
 */
public class JSR_250_Test {
    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("beanfactory/applicationfile-jsr-250.xml");
        JSR_250 jsr = context.getBean("jsr", JSR_250.class);
        System.out.println(jsr.getUserName());
        ((ClassPathXmlApplicationContext) context).registerShutdownHook();
    }
}
